#ifndef SERIAL_CLI_H
#define SERIAL_CLI_H
#include <Arduino.h>
#include "dev/touch.h"
// ...existing code...

// 声明 caltouch 命令的处理函数
void serial_cli_loop(){
    String command = "";
    if (Serial.available()) {
        command = Serial.readStringUntil('\n');
        command.trim();
        if (command == "caltouch") {
            xtouch_touch_cal_setup(true);
        } else if (command == "help" || command == "h") {
            Serial.println("Available commands:");
            Serial.println("  caltouch - Start touch calibration");
            Serial.println("  help, h  - Show this help message");
        } else {
            Serial.println("Unknown command: " + command);
            Serial.println("Type 'help' or 'h' for a list of available commands.");
        }
    }
}

#endif // SERIAL_CLI_H
